﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ST.Core;

namespace ST.Data
{
    /// <summary>
    /// 协议定义
    /// </summary>
    public class ProtocolSim : Int64Model
    {
        public Int64 ProtocolDefineId { get; set; }
        [NotMapped]
        public string ProtocolName { get; set; } = "";

        [NotMapped]
        public string RunState { get; set; } = "停止";


        [MaxLength(100)]
        public string Name { get; set; }="";



        [MaxLength(100)]
        public string Mode { get; set; } = "TCP"; //TCP  UDP  串口

        public string IP { get; set; } = "";
        public int Port { get; set; }


        public string ComPort { get; set; } = "";  // 串口号
        public int BaudRate { get; set; } = 9600;      // 波特率
        public int DataBits { get; set; } = 8;         // 数据位
        public string Parity { get; set; } = "None";   // 校验位
        public string StopBits { get; set; } = "One";  // 停止位




        public DateTime CrtDt { get; set; }     
        public DateTime EdtDt { get; set; }
    }
      
}
